2. Prove that the algorithm is memory-safe.
